home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / rpg / crossfir.92 / crossfir / crossfire-0.92.5 / include / xdir.h < prev    next >
C/C++ Source or Header  |  1996-07-24  |  689b  |  36 lines

  1. /* Headers and macros necessary for reading a directory
  2.  * Taken from server/input.c into separate files when this was needed
  3.  * in server/encounter.c, too
  4.  */
  5.  
  6. #ifndef M_UNIX
  7. #define M_UNIX
  8. #endif
  9. #define POSIX
  10.  
  11. #include <sys/types.h>
  12. #ifdef NeXT
  13. #include <sys/dir.h>
  14. #endif
  15.  
  16. #include <sys/stat.h>
  17. #include <dirent.h>
  18. struct xdirect {
  19.   short d_namlen;
  20.   char  *d_name;
  21.   int   size;
  22.   int   time;
  23. };
  24. #define XDIR DIR
  25.  
  26. /*struct xdirect *xreaddir(XDIR *, int);*/
  27.  
  28. #define xopendir(path)          (opendir(path))
  29. #define xclosedir(dir_ptr)      (closedir(dir_ptr))
  30. #define xrewinddir(dir_ptr)     (rewinddir(dir_ptr))
  31.  
  32. #ifndef S_ISREG
  33. #define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
  34. #endif
  35.  
  36.